package cn.lzh.service;

import cn.lzh.entity.Hot;
import cn.lzh.mapper.HotMapper;
import cn.lzh.service.HotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HotServiceImpl implements HotService {
    @Autowired
    HotMapper hotMapper;
    @Override
    public List<Hot>  findAll() {
       return  hotMapper.findAll();
    }

    @Override
    public void addHot(Hot hot) {
        hotMapper.addHot(hot);

    }

    @Override
    public Hot finsByid(int id) {
        return hotMapper.finsByid(id);
    }

    @Override
    public int delete(Integer id) {
        return hotMapper.delete(id);
    }

    @Override
    public List<Hot> findByType(int n1, int n2) {
        return hotMapper.findByType(n1,n2);
    }
}
